home *** CD-ROM | disk | FTP | other *** search
/ Power Programmierung / Power-Programmierung (Tewi)(1994).iso / magazine / pcmagazi / 1989 / 18 / varmac.wpm < prev   
Text File  |  1989-09-18  |  1KB  |  41 lines

  1.  
  2. {;}VARMAC.WPM∙demonstrates∙putting∙COMMANDS∙in∙variables~
  3. {;}=====================================================~
  4. {;}{VAR∙1}∙holds∙users∙name,∙entered∙from∙keyboard~
  5. {;}{VAR∙2}∙gets∙choice∙of∙header∙or∙footer~
  6. {;}The∙macro∙builds∙a∙command∙in∙{VAR∙3}∙and∙then∙executes∙it~
  7.  
  8. {TEXT}1~What∙is∙your∙name:~
  9. {ASSIGN}3~~
  10. {LABEL}top~
  11.      {CHAR}2~Make∙a∙{^]}1.∙H{^\}eader∙or∙a∙{^]}2.∙F{^\}ooter?∙0~
  12.      {CASE}{VAR 2}~
  13.         1~dohead~H~dohead~h~dohead~
  14.         2~dofoot~F~dofoot~f~dofoot~
  15.      ~
  16.      {;}If∙we∙reach∙this∙spot,∙it∙means∙the∙user's∙input
  17.         was∙not∙1,∙2,∙H,∙h,∙F,∙or∙f~
  18.      {PROMPT}{BELL}Bad∙input,∙try∙again.~
  19.      {WAIT}10~
  20. {GO}top~
  21.  
  22. {LABEL}good~
  23.      {;}Add∙the∙contents∙of∙{VAR∙1}∙to∙the∙commands
  24.         in∙{VAR∙3},∙along∙with∙a∙[HRt]∙and∙two
  25.         {Exit}∙commands.~
  26.      {ASSIGN}3~{VAR 3}{VAR 1}{Enter}{Exit}{Exit}~
  27.      {DISPLAY OFF}
  28.      {VAR 3}
  29.      {DISPLAY ON}
  30. {QUIT}
  31.  
  32. {LABEL}dohead~
  33.      {;}Put∙commands∙to∙create∙a∙header∙into∙{VAR∙3}~
  34.      {ASSIGN}3~{Format}phap~
  35. {GO}good~
  36.  
  37. {LABEL}dofoot~
  38.      {;}Put∙commands∙to∙create∙a∙footer∙into∙{VAR∙3}~
  39.      {ASSIGN}3~{Format}pfap~
  40. {GO}good~
  41.